<!--首页-标题-->
<template>
  <div class="title" @click="click">
    <div :class="['title-line', type]"></div>
    <text class="font36 text2 all">{{title}}</text>
    <text class="font24 text3">{{subtitle}}</text>
    <LImage v-if="arrow" class="img-arrow" :src="Config.img('jiantou_lan.png')"></LImage>
  </div>
</template>

<style src="@/_css/style.css" ></style>
<style scoped>
.title{
  flex-direction: row;
  align-items: center;
}
.title-line{
  position: absolute;
  width: 128px;
  height: 16px;
  background-image: linear-gradient(to right, #1677FE, #070E28);
  border-radius: 8px;

  bottom: 0;
  left: 0;
}
.line-hong{
  background-image: linear-gradient(to right, #DB4564, #070E28);
}
.img-arrow{
  width:18px;
  height:18px;
  margin-left: 8px;
}
</style>

<script>
import jconfig from "@/_js/config";

export default {
  
  props:{
    title:{
      type:String,
      default:'',
    },

    subtitle:{
      type:String,
      default:'',
    },

    type:{
      type:String,
      default:'',
    },

    arrow: {
      type:Boolean,
      default: true,
    }
  },

  data() {
    return {
      Config:jconfig,
    };
  },

  created() {
  },

  methods: {
    /********************************** 点击触发*/
    //标题
    click(){
      if (this.arrow) {
        this.$emit("click");
      }
    }
  }
}
</script>

